package com.ilearn.rest.controller;

/**
 * @Project: cmcchq
 * @Description:
 * @Version 1.0
 * @Throws :
 * @Author: <li>2019/6/27 lyndon Create 1.0
 * @Copyright (c)2019-2019 版权所有
 * @Modified By:
 */

import java.util.ArrayList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class EmployeeDataController {
    private static Logger log = LoggerFactory.getLogger(EmployeeDataController.class);

    @RequestMapping(value = "/addresses", method = RequestMethod.GET)
    public List<String> getAddresses() {
        log.info("get addresses Start");

        ArrayList<String> employeeAddresses = new ArrayList<String>();
        employeeAddresses.add("addr1");
        employeeAddresses.add("addr2");
        employeeAddresses.add("addr3");

        return employeeAddresses;
    }

    @RequestMapping(value = "/phones", method = RequestMethod.GET)
    public List<String> getPhoneNumbers() {
        log.info("get phones Start");

        ArrayList<String> phoneNumberList = new ArrayList<String>();

        phoneNumberList.add("100000");
        phoneNumberList.add("200000");

        return phoneNumberList;
    }

    @RequestMapping(value = "/names", method = RequestMethod.GET)
    public List<String> getEmployeeName() {
        log.info("get names Start");

        List<String> employeeList = new ArrayList<String>();

        employeeList.add("Santa");
        employeeList.add("Banta");

        return employeeList;
    }
}